<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>系统管理-编码管理</title>
		<jsp:include page="../../include/base.jsp"></jsp:include>
		<jsp:include page="../../include/common.jsp"></jsp:include>
		<script src="../MainHandler.js" type="text/javascript"></script>
		<link href="../../resource/css/main.css" type="text/css" rel="stylesheet" />
		<script src="codePanel.js" type="text/javascript"></script>
	</head>
	<body>
	<div id="codeToolbar" class="mini-toolbar" style="border:0;font-size:12px;padding-left:6px;">
    <table style="width:100%;">
        <tr>
        <td style="width:100%;">
            <a class="mini-button" iconCls="icon-add" plain="false" onclick="CodePanel.add">新增编码</a>
            <a class="mini-button" iconCls="icon-edit" plain="false" onclick="CodePanel.edit">修改编码</a>
            <a class="mini-button" iconCls="icon-remove" plain="false" onclick="CodePanel.del">删除编码</a>
            <span class="separator"></span>
            <a class="mini-button" iconCls="icon-reload" plain="false" onclick="CodePanel.reload">刷新</a>
        </td>
        </tr>
    </table>
</div>
   
    <div class="mini-fit" >
        
        <div id="codeTreegrid" class="mini-treegrid" expandOnLoad=1
					style="width: 100%; height: 100%;" showTreeIcon="true"
					treeColumn="code" idField="id" parentField="pfunId" showCheckBox="false"
					resultAsTree="false" checkRecursive="true" autoCheckParent="true" 
					borderStyle="border-bottom:0;border-left:0;border-right:0;">
            <div property="columns">
                <div name="code" field="code" width="200" headerAlign="center" allowSort="true">编码</div>    
                <div field="name" width="200" headerAlign="center" allowSort="true">名称</div>                            
                <div field="type" width="100" align="center" headerAlign="center">类别</div>
                <div field="data" width="100%" align="center" allowSort="true" headerAlign="center">数据</div>                                    
            </div>
        </div> 
</div>

	<div id="codeEditWindow" class="mini-window" title="管理编码"
			style="width: 500px;" showModal="true" allowResize="false"
			allowDrag="true">
			<div id="codeEditform" class="form">
				<input class="mini-hidden" name="id" />
				<input class="mini-hidden" name="pid" />
				<table style="width: 100%;">
					<tr>
						<td style="width: 100px;" align="right">上级：</td>
						<td style="width: 300px;" align="center">
							<input name="pName" class="mini-textbox" allowInput="flase"  style="width: 250px" /></td>
					</tr>
					<tr>
						<td align="right">名称：</td>
						<td align="center">
						<input name="name" class="mini-textbox" required="true" style="width: 250px" /></td>
						<td style="color: red;">必填</td>
					</tr>
					<tr>
						<td align="right">编码：</td>
						<td align="center">
							<input name="code" class="mini-textbox" style="width: 250px" required="true" />
						</td>
						<td style="color: red;">必填</td>
					</tr>
					<tr><td align="right">类别：</td>
						<td align="center">
							<input name="type" class="mini-textbox" required="true" style="width: 250px"  />
						</td>
						<td style="color: red;">必填</td>
					</tr>
					<tr>
						<td align="right">数据：</td>
						<td align="center">
							<input name="data" class="mini-textarea" style="width: 250px" height="100px" />
						</td>
					</tr>
					<tr>
						<td
							style="text-align: center; padding-top: 5px; padding-right: 20px;"
							colspan="6">
							<a class="mini-button " plain="true" iconCls="icon-add"
								onclick="CodePanel.save">保存</a>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<a class="mini-button" plain="true" iconCls="icon-remove"
								onclick="CodePanel.closeButton">关闭</a>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						</td>
					</tr>
				</table>
			</div>
		</div>

	<script type="text/javascript">
       		mini.parse();
			CodePanel.init();
	</script>
	</body>
</html>
